package com.demo.pojo;

import com.alibaba.fastjson2.annotation.JSONField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Schema(description = "分页结果返回")
public class EntityPage<T> {

    @Schema(description = "总数")
    @JSONField(name = "total")
    private Long total;

    @Schema(description = "数据")
    @JSONField(name = "data")
    private T data;

    @Schema(description = "每页数据量")
    @JSONField(name = "pageSize")
    private int pageSize;
}
